import 'package:flutter/material.dart';
import 'package:study_flutter/yzhg/project/wx_read/BaseCard.dart';

//本周推荐卡片
class CardRecommend extends BaseCard {
  @override
  _CardRecommendState createState() => _CardRecommendState();
}

class _CardRecommendState extends BaseCardState {
  @override
  void initState() {
    subTitleColor = Color(0xffb99444);
    super.initState();
  }

  /*
   * 实现 头部标题
   */
  @override
  topTitle(String title) {
    return super.topTitle("本周推荐");
  }

  /*
   * 实现子标题
   */
  @override
  subTitle(String title) {
    return super.subTitle("送你一天无限卡 全场书籍免费读 >");
  }

  @override
  bottomContent() {
    return Expanded(
        child: Container(
      //撑开布局
      constraints: BoxConstraints.expand(),
      margin: EdgeInsets.only(top: 20),
      child: Image.network(
        "http://www.devio.org/io/flutter_beauty/card_1.jpg",
        fit: BoxFit.cover,
      ),
    ));
  }
}
